﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using SMSSnew.DATA.CLASSES;

namespace SMSSnew.BIZ
{
    public class TimetableBIZ
    {
        timeTableCLZ ttCLZ;


       public bool hasTeacherConflict(string tID, string sID)
        {
            ttCLZ =new timeTableCLZ();

            DataTable dt = new DataTable();
            bool verify = false;

            dt = ttCLZ.teacherConflict(tID, sID);
            int noOfRows = dt.Rows.Count;


            if (noOfRows != 0)
            {
                verify = true;
            }

            return verify;
        }


      public  bool hasClassConflict(string cID, string sID)
        {
            ttCLZ = new timeTableCLZ();
            DataTable dt = new DataTable();
            bool verify = false;

            dt = ttCLZ.classConflict(cID, sID);
            int noOfRows = dt.Rows.Count;


            if (noOfRows != 0)
            {
                verify = true;
            }

            return verify;
        }

      public bool isSelfStudies(string tID)
      {
          bool verify = false;
          if (tID == "Self")
              verify = true;

          return verify;
      }
      
    }
}
